<%@ page contentType="text/html" language="java" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib  uri="/struts-tags" prefix="s"%>
<div class="pageContent">
		<c:if test="${b_T_Ufp_Material !=null}">
		<form method="post" action="projectmanagement/EngineerMaterial_engineerMaterialsetsession" class="pageForm required-validate" onsubmit="return validateCallback(this, bbc);">
		<div class="pageFormContent" layoutH="66">
			<p>
				<label>材料名称：</label>
				<label><input type="text" id="categoryName" name="b_T_Ufp_Material.categoryName"  value="${b_T_Ufp_Material.categoryName}"size="26" readonly="readonly"/></label>
			</p>
			<p>
			<input type="hidden" id="positiontype" name="positiontype" value="${positiontype}"/>
				<label>材料编号：</label>
				<label><input type="text" id="materialName" name="b_T_Ufp_Material.materialName"  value="${b_T_Ufp_Material.materialName}"size="26" readonly="readonly"/></label>
			</p>
			<p>
				<label>单位：</label>
				<label><s:select label="单位" headerKey="平米" headerValue="平米" list="{'件','只','扇','自然间','户','套','片','组','元','个','张','米','项','其它'}" name="b_T_Ufp_Material.unit"    cssStyle="width:165px;" /></label>
			</p>
			<p>
				<label>订购数量：</label>
				<label><input type="text" id="quantity" name="b_T_Ufp_Material.quantity"  value="${b_T_Ufp_Material.quantity}"size="26" class="required number"/></label>
			</p>
			<p>
				<label>规格：</label>
				<label><input type="text" id="materialModel" name="b_T_Ufp_Material.materialModel"  value="${b_T_Ufp_Material.materialModel}"size="26" readonly="readonly"/></label>
			</p>
			<p>
				<label>品牌：</label>
				<label>	 <input type="text" id="materialBrand" name="b_T_Ufp_Material.materialBrand"  value="${b_T_Ufp_Material.materialBrand}"size="26" readonly="readonly"/></label>
			</p>
			<p>
				<label>饰面：</label>
				<label><input type="text" id="finishes" name="b_T_Ufp_Material.finishes"  value="${b_T_Ufp_Material.finishes}"size="26" readonly="readonly"/></label>
			</p>
			<p>
				<label>产地：</label>
				<label><input type="text" id="producter" name="b_T_Ufp_Material.producter"  value="${b_T_Ufp_Material.producter}"size="26" readonly="readonly"/></label>
			</p>
			<p>
				<label>客户报价：</label>
				<label><input type="text" id="angebotspreis" name="b_T_Ufp_Material.angebotspreis"  value="${b_T_Ufp_Material.angebotspreis}"size="26" readonly="readonly"/></label>
			</p>
			<%-- <p>
				<label>附加说明：</label>
				<textarea id="remark" name="b_T_Ufp_Material.remark"  value="${b_T_Ufp_Material.remark}" cols="60" rows="5" readonly="readonly">${b_T_Ufp_Material.remark}</textarea>
			</p> --%>
			</c:if>
			
			<!-- 2个不同的页面根据对象不同分辨 -->
			
		<c:if test="${b_T_Ufp_EngineerMaterial !=null}">
		<form method="post" action="projectmanagement/EngineerMaterial_engineerMaterialUpdate" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
		<div class="pageFormContent" layoutH="66">
		<p>
				<label>材料名称：</label>
				<label><input type="text" id="engineeringName" name="b_T_Ufp_EngineerMaterial.engineeringName"  value="${b_T_Ufp_EngineerMaterial.engineeringName}"size="26" readonly="readonly"/></label>
			</p>
			<p>
			<input type="hidden" id="uuid" name="b_T_Ufp_EngineerMaterial.uuid" value="${b_T_Ufp_EngineerMaterial.uuid}"/>
			<input type="hidden" id="engineeringUuid" name="b_T_Ufp_EngineerMaterial.engineeringUuid" value="${b_T_Ufp_EngineerMaterial.engineeringUuid}"/>
				<label>材料编号：</label>
				<label><input type="text" id="materialName" name="b_T_Ufp_EngineerMaterial.materialName"  value="${b_T_Ufp_EngineerMaterial.materialName}"size="26" readonly="readonly"/></label>
			</p>
			<p>
				<label>单位：</label>
				<label><s:select label="单位" headerKey="平米" headerValue="平米" list="{'件','只','扇','自然间','户','套','片','组','元','个','张','米','项','其它'}" name="b_T_Ufp_EngineerMaterial.unit"    cssStyle="width:165px;" /></label>
			</p>
			<p>
				<label>订购数量：</label>
				<label><input type="text" id="quantity1" name="b_T_Ufp_EngineerMaterial.quantity"  value="${b_T_Ufp_EngineerMaterial.quantity}"size="26" class="required number"/></label>
			</p>
			<p>
				<label>规格：</label>
				<label><input type="text" id="materialModel" name="b_T_Ufp_EngineerMaterial.materialModel"  value="${b_T_Ufp_EngineerMaterial.materialModel}"size="26" readonly="readonly"/></label>
			</p>
			<p>
				<label>品牌：</label>
				<label>	 <input type="text" id="materialBrand" name="b_T_Ufp_EngineerMaterial.materialBrand"  value="${b_T_Ufp_EngineerMaterial.materialBrand}"size="26" readonly="readonly"/></label>
			</p>
			<p>
				<label>饰面：</label>
				<label><input type="text" id="finishes" name="b_T_Ufp_EngineerMaterial.finishes"  value="${b_T_Ufp_EngineerMaterial.finishes}"size="26" readonly="readonly"/></label>
			</p>
			<p>
				<label>产地：</label>
				<label><input type="text" id="producter" name="b_T_Ufp_EngineerMaterial.producter"  value="${b_T_Ufp_EngineerMaterial.producter}"size="26" readonly="readonly"/></label>
			</p>
			<c:choose>
				<c:when test="${isupdate == 'y'}">
					<p>
						<label>客户报价：</label>
						<label><input type="text" id="angebotspreis1" name="b_T_Ufp_EngineerMaterial.angebotspreis"  value="${b_T_Ufp_EngineerMaterial.angebotspreis}"size="26" class="required number"/></label>
					</p>
				</c:when>
				<c:otherwise>
					<p>
						<label>客户报价：</label>
						<label><input type="text" id="angebotspreis1" name="b_T_Ufp_EngineerMaterial.angebotspreis"  value="${b_T_Ufp_EngineerMaterial.angebotspreis}"size="26" readonly="readonly"/></label>
					</p>
				</c:otherwise>
			</c:choose>
				<p>
				<label>总计：</label>
				<label><input type="text" id="totalAmount1" name="b_T_Ufp_EngineerMaterial.totalAmount"  value="${b_T_Ufp_EngineerMaterial.totalAmount}"size="26" readonly="readonly"/></label>
			</p>
			<%-- <p>
				<label>附加说明：</label>
				<textarea id="remark" name="b_T_Ufp_EngineerMaterial.remark"  value="${b_T_Ufp_EngineerMaterial.remark}" cols="60" rows="5" readonly="readonly">${b_T_Ufp_EngineerMaterial.remark}</textarea>
			</p> --%>
			</c:if>
			
			<c:if test="${b_T_Ufp_EngineerMaterialCustom !=null}">
		<form method="post" action="projectmanagement/EngineerMaterial_engineerMaterialUpdate" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
		<div class="pageFormContent" layoutH="66">
		<p>
				<label>材料名称：</label>
				<label><input type="text" id="material_name" name="b_T_Ufp_EngineerMaterial.engineeringName"  value="${b_T_Ufp_EngineerMaterialCustom.engineeringName}"size="26" /></label>
			</p>
			<p>
			<input type="hidden" id="engineeringUuid" name="b_T_Ufp_EngineerMaterial.engineeringUuid" value="${b_T_Ufp_EngineerMaterialCustom.engineeringUuid}"/>
				<label>材料编号：</label>
				<label><input type="text" id="materialName" name="b_T_Ufp_EngineerMaterial.materialName"  value="${b_T_Ufp_EngineerMaterialCustom.materialName}"size="26"  class="alphanumeric"/></label>
			</p>
			<p>
				<label>单位：</label>
				<label><s:select label="单位" headerKey="平米" headerValue="平米" list="{'件','只','扇','自然间','户','套','片','组','元','个','张','米','项','其它'}" name="b_T_Ufp_EngineerMaterial.unit"    cssStyle="width:165px;" /></label>
			</p>
			<p>
				<label>规格：</label>
				<label><input type="text" id="materialModel" name="b_T_Ufp_EngineerMaterial.materialModel"  value="${b_T_Ufp_EngineerMaterial.materialModel}"size="26" /></label>
			</p>
			<p>
				<label>品牌：</label>
				<label>	 <input type="text" id="materialBrand" name="b_T_Ufp_EngineerMaterial.materialBrand"  value="${b_T_Ufp_EngineerMaterial.materialBrand}"size="26" /></label>
			</p>
			<p>
				<label>饰面：</label>
				<label><input type="text" id="finishes" name="b_T_Ufp_EngineerMaterial.finishes"  value="${b_T_Ufp_EngineerMaterial.finishes}"size="26" /></label>
			</p>
			<p>
				<label>产地：</label>
				<label><input type="text" id="producter" name="b_T_Ufp_EngineerMaterial.producter"  value="${b_T_Ufp_EngineerMaterial.producter}"size="26"  /></label>
			</p>
			<p>
				<label>客户报价：</label>
				<label><input type="text" id="angebotspreis1" name="b_T_Ufp_EngineerMaterial.angebotspreis"  value="${b_T_Ufp_EngineerMaterial.angebotspreis}"size="26"  class="number"/></label>
			</p>
			<p>
				<label>订购数量：</label>
				<label><input type="text" id="quantity1" name="b_T_Ufp_EngineerMaterial.quantity"  value="${b_T_Ufp_EngineerMaterial.quantity}"size="26" class="number"/></label>
			</p>
				<p>
				<label>总计：</label>
				<label><input type="text" id="totalAmount1" name="b_T_Ufp_EngineerMaterial.totalAmount"  value="${b_T_Ufp_EngineerMaterial.totalAmount}"size="26" readonly="readonly" class="number required"/></label>
			</p>
			<%-- <p>
				<label>附加说明：</label>
				<textarea id="remark" name="b_T_Ufp_EngineerMaterial.remark"  value="${b_T_Ufp_EngineerMaterial.remark}" cols="60" rows="5" readonly="readonly">${b_T_Ufp_EngineerMaterial.remark}</textarea>
			</p> --%>
			</c:if>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
		</div>
	</form>
</div>
<script type="text/javascript">
$(function() {
		$("#quantity1").blur(function() {
			var num = $("#quantity1").val();
			var price =$("#angebotspreis1").val();
			$("#totalAmount1").val(parseFloat(num*price).toFixed(2));
		});
		$("#angebotspreis1").blur(function() {
			var num = $("#quantity1").val();
			var price =$("#angebotspreis1").val();
			$("#totalAmount1").val(parseFloat(num*price).toFixed(2));
		});
	});
function bbc(){
$.pdialog.closeCurrent();
test1();
}
</script>